package com.aabte.design.pattern.structural.proxy.staticproxy;

import com.aabte.design.pattern.structural.proxy.Order;

public class Test {
    public static void main(String[] args) {

        Order order = new Order();
        order.setUserId(1);

        OrderServiceStaticProxy orderServiceStaticProxy = new OrderServiceStaticProxy();

        orderServiceStaticProxy.saveOrder(order);

        // 静态代理 before code
        // 静态代理分配到[db1]处理数据
        // 静态代理 after code
        // Service层调用Dao层添加Order
        // Dao层添加Order成功

    }
}
